<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>	
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<s:head theme="ajax"/>
<style type="text/css">
hr {
	margin-bottom: 0px;
	margin-top: 0px;		
}
#lwtab{
	font-size: small;
}
</style>
</head>
<body>
	<center>		
		<table border="0" width="800">
			<tr>
				<td align="left">
					<s:url id="prevWURL" action="listweek" namespace="/commute">
						<s:param name="swdate">
							<s:date name="prevweek" format="yyyy-MM-dd"/>
						</s:param>
					</s:url>				
					<s:a href="%{prevWURL}" theme="ajax" targets="commcon">
						<s:date name="prevweek" format="yyyy"/>년&nbsp;${pwnum }주차
					</s:a>
					&nbsp;◀&nbsp;
					<s:date name="toweek" format="yyyy"/>년&nbsp;${twnum }주차
					&nbsp;▶&nbsp;
					<s:url id="nextWURL" action="listweek" namespace="/commute">
						<s:param name="swdate">
							<s:date name="nextweek" format="yyyy-MM-dd"/>
						</s:param>
					</s:url>								
					<s:a href="%{nextWURL}" theme="ajax" targets="commcon">
						<s:date name="nextweek" format="yyyy"/>년&nbsp;${nwnum }주차
					</s:a>
					&nbsp;
					<s:url id="toWURL" action="listweek" namespace="/commute">
						<s:param name="swdate" value=""/>						
					</s:url>								
					<s:a href="%{toWURL}" theme="ajax" targets="commcon">
						<img src="/ssteam/image/commute/butt_week.png" border="0" align="middle">
					</s:a>					
				</td>
			</tr>
		</table>
		<br>
		<hr color="#5B8ED9" width="800">
		<table border="0" width="800" id="lwtab">
			<tr>			
				<th align="center" width="11%">사번</th>
				<th align="center" width="13%">지각횟수</th>
				<th align="center" width="13%">총 근무시간</th>
				<s:iterator value="sweek">
				<th align="center" width="9%"><s:property/></th>
				</s:iterator>
			</tr>
			<tr>
				<td colspan="10"><hr color="#D7D7D7"></td>
			</tr>
			<s:iterator id="lstw" status="lststt" value="listw">
			<tr onmouseover="this.style.backgroundColor='#eaf0fa'" onmouseout="this.style.backgroundColor=''">				
				<td><s:property value="%{listw.get(#lststt.index).get(1).sabun}"/></td>
				<td>&nbsp;</td>			
				<td>&nbsp;</td>
				<s:iterator id="cwlst" value="lstw">				
				<td valign="top" height="20">
					<font style="font-size: x-small;">
					<s:date name="cwork" format="HH:mm"/>
					<br>
					<s:date name="lwork" format="HH:mm"/>
					</font>	
				</td>
				</s:iterator>
			</tr>
			<tr>
				<td colspan="10"><hr color="#D7D7D7"></td>
			</tr>
			</s:iterator>
		</table>		
		<table border="0" width="800">
			<tr>
				<td width="50%" align="right">
					<c:forEach begin="1" end="${totalpage }" step="1" var="i">						
						<s:url id="commPageURL" action="listweek" namespace="/commute">						
							<s:param name="sabun">${session.user.sabun }</s:param>
							<s:param name="curpage">${i }</s:param>
						</s:url>
						<c:choose>
							<c:when test="${curpage == i }">
								<font color="black">[${i }]&nbsp;</font>
							</c:when>
							<c:otherwise>
								<s:a href="%{commPageURL}" theme="ajax" targets="commcon">
								[${i }]
								</s:a>
								&nbsp;
							</c:otherwise>
						</c:choose>							
					</c:forEach>					
				</td>
				<td width="50%" align="left">
					${curpage } / ${totalpage } 페이지
				</td>
			</tr>
		</table>		
	</center>
</body>
</html>